<template>
  <div class="content">
    <p></p>
    <ul>
      <li v-for="(item, index) in list" :key="index">
        <span v-if="index == activeIndex">{{ item.name }}</span>
      </li>
      <li v-for="(item, index) in list" :key="index">
        <span v-if="index == activeIndex+1">{{ item.name }}</span>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        { id: 1, name: "收益" },
        { id: 2, name: "成本收入比" },
        { id: 3, name: "净息差" },
        { id: 4, name: "资产总额" },
        { id: 5, name: "负债总额" }
      ],
      activeIndex: 0
    };
  },
  mounted() {
    this.$nextTick(() => {});
  },
  methods: {}
};
</script>

<style scoped>
.content {
  width: 100%;
  height: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
  margin: 300px 0;
}
.content p {
  width: 100%;
  height: 1%;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 251, 0),
    rgba(0, 255, 251, 0.84),
    rgba(0, 255, 251, 0)
  );
  position: absolute;
  top: 0;
}
.content ul {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  position: absolute;
  top: 0;
}
</style>
